const axios = require("axios");
//获取token令牌
let token = localStorage.getItem("token");
//基础网址：主机+域名+端口
axios.defaults.baseURL = "http://fitness.h5.itsource.cn:3701";
//设置携带令牌的请求头
if (token) {
	axios.defaults.headers.common["Authorization"] = "Bearer " + token;
}
module.exports = axios;
